from django.http import HttpResponse
import datetime
from django.template.loader import get_template  
from django.template import Context  

def current_datetime(request):
    now = datetime.datetime.now()
    t = get_template('current_datetime.html')
    html = t.render(Context({'current_date': now})) 
    return HttpResponse(html)

def hours_ahead(request, offset):
	offset = int(offset)  
	dt = datetime.datetime.now() + datetime.timedelta(hours=offset)  
	html = "In %s hour(s), it will be %s." % (offset, dt)  
	#html = "I got a %s"%offset
	return HttpResponse(html)  

